package com.dime.physical.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dime.physical.mapper.DimePhysicalharmsMapper;
import com.dime.physical.domain.DimePhysicalharms;
import com.dime.physical.service.IDimePhysicalharmsService;

/**
 * 人员危害Service业务层处理
 * 
 * @author Tiny
 * @date 2023-09-14
 */
@Service
public class DimePhysicalharmsServiceImpl implements IDimePhysicalharmsService 
{
    @Autowired
    private DimePhysicalharmsMapper dimePhysicalharmsMapper;

    /**
     * 查询人员危害
     * 
     * @param id 人员危害主键
     * @return 人员危害
     */
    @Override
    public DimePhysicalharms selectDimePhysicalharmsById(String id)
    {
        return dimePhysicalharmsMapper.selectDimePhysicalharmsById(id);
    }

    /**
     * 查询人员危害列表
     * 
     * @param dimePhysicalharms 人员危害
     * @return 人员危害
     */
    @Override
    public List<DimePhysicalharms> selectDimePhysicalharmsList(DimePhysicalharms dimePhysicalharms)
    {
        return dimePhysicalharmsMapper.selectDimePhysicalharmsList(dimePhysicalharms);
    }

    /**
     * 新增人员危害
     * 
     * @param dimePhysicalharms 人员危害
     * @return 结果
     */
    @Override
    public int insertDimePhysicalharms(DimePhysicalharms dimePhysicalharms)
    {
        dimePhysicalharms.setCreateTime(DateUtils.getNowDate());
        return dimePhysicalharmsMapper.insertDimePhysicalharms(dimePhysicalharms);
    }

    /**
     * 修改人员危害
     * 
     * @param dimePhysicalharms 人员危害
     * @return 结果
     */
    @Override
    public int updateDimePhysicalharms(DimePhysicalharms dimePhysicalharms)
    {
        dimePhysicalharms.setUpdateTime(DateUtils.getNowDate());
        return dimePhysicalharmsMapper.updateDimePhysicalharms(dimePhysicalharms);
    }

    /**
     * 批量删除人员危害
     * 
     * @param ids 需要删除的人员危害主键
     * @return 结果
     */
    @Override
    public int deleteDimePhysicalharmsByIds(String[] ids)
    {
        return dimePhysicalharmsMapper.deleteDimePhysicalharmsByIds(ids);
    }

    /**
     * 删除人员危害信息
     * 
     * @param id 人员危害主键
     * @return 结果
     */
    @Override
    public int deleteDimePhysicalharmsById(String id)
    {
        return dimePhysicalharmsMapper.deleteDimePhysicalharmsById(id);
    }
}
